using BlogExample.Core.Domain;

namespace BlogExample.Core.Services
{
	public class IdentifierDisplayStrategy : IDisplayStrategy
	{
		public bool Matches(DomainEntity entity)
		{
			return entity is IHaveIdentifier;
		}

		public string GetEntityDescription(DomainEntity entity)
		{
			var identifierEntity = entity as IHaveIdentifier;
			return identifierEntity.Identifier + " " + entity.EntityDescription;
		}
	}
}